Ensure metadata for libs/bins are distinct
authorAlex Crichton <alex@alexcrichton.com>
Fri, 26 Feb 2016 22:27:53 +0000 (14:27 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 26 Feb 2016 22:27:53 +0000 (14:27 -0800)
commitbdf18a4fe7b83a8ab91baa78a1d516d64ff826b3
tree378601ab4f92dcfbf353123e6f2f2a730bac5072
parent4a8a38ce9e65c8c2820487f77ecdadf240de89bd
Ensure metadata for libs/bins are distinct

It may be the case in the future that the compiler will require that the "salt"
(the `-C metadata` flag) for all crates with the same name are distinct. Right
now a Cargo project with a library and a binary, however, will have the same
salt with the same crate name.

This commit mixes in some extra data to the library's salt to ensure that its
symbols don't clash with the binary's.
src/cargo/util/toml.rs